<template>
  <div class="app-container">
    <el-row :gutter="20">
      <el-col :span="14">
        <div>项目初始化命令-示例：</div>
        <p>{{ mvn.cmdPrompt }}</p>
      </el-col>
      <el-col :span="14">
        <div>项目初始化命令：{{ project }}</div>
        <el-input v-model="mvn.cmd" type="textarea" rows="8" :placeholder="mvn.cmdPrompt" />
      </el-col>
      <el-col :span="14">
        <!--el-button type="primary" @click="codeInit()">项目初始化</el-button>
        <el-button type="danger" @click="codePush()">推送至Gitlab</el-button-->
        <el-button type="primary" class="mt12" @click="back()">返回</el-button>
      </el-col>
    </el-row>
  </div>
</template>

<script>
export default {
  name: 'ProjectInit',
  components: {},
  data() {
    return {
      project: '',
      mvn: {
        cmd: '',
        cmdPrompt: 'mvn archetype:generate -DarchetypeCatalog=local -DgroupId=com.anjiplus.新项目名 -DartifactId=新项目名 -Dpackage=com.anjiplus.新项目名 -Dversion=1.0.0-SNAPSHOT -DarchetypeGroupId=com.anji-plus.gaea -DarchetypeArtifactId=template-archetype -DarchetypeVersion=1.0.0-SNAPSHOT -DinteractiveMode=false',
      },
    }
  },
  watch: {},
  created() {
    this.project = this.$route.query.projectName
  },
  methods: {
    codeInit() {},
    codePush() {},
    back() {
      this.$router.go(-1)
    },
  },
}
</script>
<style scoped>
.mt12 {
  margin-top: 12px;
}
</style>
